package com.study.csc.a02threadcase2;

/**
 * @author csc
 * @Date 2023/10/18 10:15
 * @PackageName:com.study.csc.a02threadcase2
 * @ClassName: MyRun
 * @Description: 创建线程的第二种方式
 * @Version 1.0
 */
public class MyRun implements  Runnable{
    @Override
    public void run() {
        for (int i = 0; i<100;i++) {
            //获取当前线程的对象
//        Thread thread = Thread.currentThread();
//        System.out.println(thread.getName()+" hello word");

            System.out.println(Thread.currentThread().getName()+" hello word");
        }
    }

}
